package com.newtribe.rmi.rmiservice;

import java.rmi.Naming;
import java.rmi.registry.LocateRegistry;

import com.newtribe.security.cert.CAConfig;
import com.newtribe.security.cert.DomainFactory;
import com.newtribe.security.cert.WorkerInstance;



public class testService {
  public testService() {
  }
  public static void main(String[] args) throws Exception {


//     ms.start() ;
//     ms.start() ;

     LocateRegistry.createRegistry(1099);

     //  Naming.rebind("rmi://localhost:1099/Untitled1", localObject);
//     Naming.bind("com.neusoft.name.STATEQUERY", sqs);
     


     DomainFactory factory =DomainFactory.getFactory() ;

     WorkerInstance instance =factory.getWorkerInstance("default") ;
     System.out.println(instance);
     
     Naming.bind("ca", instance);

     System.out.println("rmi registry ok !");

   }


}